function test(a, b) {
  console.log(b);
  return {
    test: function (c) {
      return test(c, a);
    },
  };
}
var retA = test(0);
retA.test(2);
retA.test(4);
retA.test(8);
var retB = test(0).test(2).test(4).test(8);
var retC = test("good").test("bad");
retC.test("good");
retC.test("bad");

/* undefined
0
0
0

undefined
0
2
4

undefined
good
bad
bad */
